package cn.neo.hhrpc.core.api;

/**
 * 过滤器
 *  做一些过滤，前置、后置处理
 */
public interface Filter {

    Object prefilter(RpcRequest request);
    Object postfilter(RpcRequest request, RpcResponse response,Object result);

    // 调用链
//    Filter next();



    Filter Default = new Filter() {
        @Override
        public Object prefilter(RpcRequest request) {
            return null;
        }

        @Override
        public Object postfilter(RpcRequest request, RpcResponse response,Object result) {
            return null;
        }
    };

}
